Conversation
Reviewer's GuideRefactors reviewer-facing continuity and memory history surfaces, tightens CLI audit history semantics and performance, and removes internal review artifacts and their public references without altering existing JSON contracts. Sequence diagram for cam audit history resolution and scanningsequenceDiagram
actor User
participant AuditCLI as AuditCLI
participant AuditCommand as runAudit
participant AuditScan as runAuditScan
participant HistoryScanner as scanHistory
participant Git as git
User->>AuditCLI: cam audit [--history|--no-history] [--json]
AuditCLI->>AuditCommand: runAudit(options)
AuditCommand->>AuditCommand: resolveIncludeHistory(options)
AuditCommand->>AuditScan: runAuditScan(cwd, includeHistory)
alt includeHistory == false
AuditScan-->>AuditCommand: skip history scan
else includeHistory == true
AuditScan->>HistoryScanner: scanHistory(cwd)
HistoryScanner->>Git: listCommits()
Git-->>HistoryScanner: commits[]
alt commits.length == 0
HistoryScanner-->>AuditScan: []
else commits.length > 0
HistoryScanner->>HistoryScanner: scanHistoryWithGitGrep(cwd, commits)
alt git grep path succeeds
HistoryScanner-->>AuditScan: findings[]
else git grep path fails
HistoryScanner->>HistoryScanner: scanHistoryLegacy(cwd)
HistoryScanner-->>AuditScan: findings[]
end
end
end
AuditScan-->>AuditCommand: AuditReport
alt options.json == true
AuditCommand-->>AuditCLI: JSON report
else options.json == false
AuditCommand-->>AuditCLI: formatted text with History scan: enabled|disabled
end
AuditCLI-->>User: Output
Sequence diagram for cam session status continuity preview flowsequenceDiagram
actor User
participant SessionCLI as SessionCLI
participant SessionCommand as runSession
participant ContinuityStore as SessionContinuityStore
participant ReviewerHistory as buildCompactHistoryPreview
User->>SessionCLI: cam session status [--json]
SessionCLI->>SessionCommand: runSession(options)
SessionCommand->>ContinuityStore: getLocation(project)
SessionCommand->>ContinuityStore: getLocation(project-local)
SessionCommand->>ContinuityStore: readState(project)
SessionCommand->>ContinuityStore: readState(project-local)
SessionCommand->>ContinuityStore: readRecentAuditEntries(previewReadLimit)
ContinuityStore-->>SessionCommand: recentContinuityAuditPreviewEntries[]
SessionCommand->>SessionCommand: recentContinuityAuditEntries = slice(0, recentContinuityAuditLimit)
SessionCommand->>SessionCommand: latestContinuityAuditEntry = recentContinuityAuditPreviewEntries[0]
SessionCommand->>ContinuityStore: readRecoveryRecord()
ContinuityStore-->>SessionCommand: pendingContinuityRecovery
alt options.json == true
SessionCommand-->>SessionCLI: JSON including latestContinuityAuditEntry and recentContinuityAuditEntries
else options.json == false
SessionCommand->>ReviewerHistory: buildCompactHistoryPreview(entries, getSignature, maxGroups, excludeLeadingCount)
ReviewerHistory-->>SessionCommand: CompactHistoryPreview
SessionCommand->>SessionCommand: formatRecentGenerationLines(preview.groups)
SessionCommand-->>SessionCLI: text output with Latest rollout and Recent prior generations
end
SessionCLI-->>User: Output
Sequence diagram for cam memory recent sync audit groupingsequenceDiagram
actor User
participant MemoryCLI as MemoryCLI
participant MemoryCommand as runMemory
participant Runtime as RuntimeContext
participant MemoryStore as MemoryStore
participant ReviewerHistory as buildCompactHistoryPreview
User->>MemoryCLI: cam memory --recent N
MemoryCLI->>MemoryCommand: runMemory(options)
MemoryCommand->>Runtime: buildRuntimeContext(cwd, configScope)
Runtime-->>MemoryCommand: runtime
MemoryCommand->>Runtime: syncService.memoryStore.readRecentSyncAuditEntries(N * 2)
MemoryStore-->>MemoryCommand: recentSyncAuditPreviewEntries[]
MemoryCommand->>MemoryCommand: recentSyncAudit = slice(previewEntries, 0, N)
alt recentSyncAuditPreviewEntries.length > 0
MemoryCommand->>ReviewerHistory: buildCompactHistoryPreview(entries, getSignature, maxGroups)
ReviewerHistory-->>MemoryCommand: CompactHistoryPreview
MemoryCommand->>MemoryCommand: formatRecentSyncAuditLines(preview)
MemoryCommand-->>MemoryCLI: text output with Recent sync events (grouped)
else no recent entries
MemoryCommand-->>MemoryCLI: text output without recent sync events section
end
MemoryCLI-->>User: Output
Class diagram for reviewer history utilities and CLI consumersclassDiagram
class CompactHistoryGroup_T {
+T latest
+int rawCount
}
class CompactHistoryPreview_T {
+CompactHistoryGroup_T groups[]
+int omittedRawCount
+int totalRawCount
}
class BuildCompactHistoryPreviewOptions_T {
+function getSignature(entry)
+int maxGroups
+int excludeLeadingCount
}
class ReviewerHistory {
+buildCompactHistoryPreview(entries, options) CompactHistoryPreview_T
}
class SessionContinuityAuditEntry {
+string rolloutPath
+string sourceSessionId
+string scope
+string preferredPath
+string actualPath
+string fallbackReason
+int codexExitCode
+EvidenceCounts evidenceCounts
+string[] writtenPaths
+string generatedAt
}
class EvidenceCounts {
+int successfulCommands
+int failedCommands
+int fileWrites
+int nextSteps
+int untried
}
class MemorySyncAuditEntry {
+string rolloutPath
+string sessionId
+string status
+string skipReason
+bool isRecovery
+string configuredExtractorMode
+string configuredExtractorName
+string actualExtractorMode
+string actualExtractorName
+int appliedCount
+string[] scopesTouched
+string resultSummary
}
class SessionCommandModule {
+runSession(options) string
+formatRecentGenerationLines(entries) string[]
}
class MemoryCommandModule {
+runMemory(options) string
+formatRecentSyncAuditLines(entries, maxGroups) string[]
}
SessionCommandModule ..> ReviewerHistory : uses
MemoryCommandModule ..> ReviewerHistory : uses
SessionCommandModule ..> SessionContinuityAuditEntry : formats
MemoryCommandModule ..> MemorySyncAuditEntry : formats
SessionContinuityAuditEntry o--> EvidenceCounts
ReviewerHistory ..> CompactHistoryPreview_T : returns
ReviewerHistory ..> BuildCompactHistoryPreviewOptions_T : consumes
CompactHistoryPreview_T o--> CompactHistoryGroup_T
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthroughThis pull request refactors history preview and audit rendering across session and memory commands, introducing a new generic Changes
Sequence DiagramsequenceDiagram
actor User
participant Session Command
participant buildCompactHistoryPreview
participant Memory/Domain
participant Audit History
User->>Session Command: runSession (load/status)
Session Command->>Audit History: read recentContinuityPreviewReadLimit (10)
Audit History-->>Session Command: raw recent entries
Session Command->>buildCompactHistoryPreview: entries + getSignature callback
buildCompactHistoryPreview->>buildCompactHistoryPreview: batch by signature
buildCompactHistoryPreview->>buildCompactHistoryPreview: coalesce consecutive duplicates
buildCompactHistoryPreview->>buildCompactHistoryPreview: calculate omitted/total counts
buildCompactHistoryPreview-->>Session Command: CompactHistoryPreview{groups, omittedRawCount}
Session Command->>Memory/Domain: extract latest rollout, generation details
Session Command-->>User: status output (Recent prior generations + latest rollout)
User->>Session Command: runSession (save)
Session Command->>Audit History: write new continuity entry
Session Command->>buildCompactHistoryPreview: render compact preview
buildCompactHistoryPreview-->>Session Command: grouped preview with omission notice
Session Command-->>User: saved with rollout path
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip Migrating from UI to YAML configuration.Use the |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In
memory-command.test.ts, the test that overwritesprocess.env.HOMEdoesn’t restore the original value, which can leak into other tests; capture and resetHOMEinbeforeEach/afterEachor inside the test. - In
audit.ts,scanHistorycallslistCommitsand then, ongit grepfailure,scanHistoryLegacycallslistCommitsagain; consider passing the already-fetched commit list into the legacy path to avoid double work on large histories.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `memory-command.test.ts`, the test that overwrites `process.env.HOME` doesn’t restore the original value, which can leak into other tests; capture and reset `HOME` in `beforeEach`/`afterEach` or inside the test.
- In `audit.ts`, `scanHistory` calls `listCommits` and then, on `git grep` failure, `scanHistoryLegacy` calls `listCommits` again; consider passing the already-fetched commit list into the legacy path to avoid double work on large histories.
## Individual Comments
### Comment 1
<location path="src/lib/security/audit.ts" line_range="259-261" />
<code_context>
+ );
+}
+
+function chunkArray<T>(items: T[], size: number): T[][] {
+ const chunks: T[][] = [];
+ for (let index = 0; index < items.length; index += size) {
+ chunks.push(items.slice(index, index + size));
+ }
</code_context>
<issue_to_address>
**issue:** Guard against a zero or negative `size` in `chunkArray` to avoid a potential infinite loop.
Because `historyRevisionBatchSize` is hard-coded and positive this works today, but `chunkArray` is a generic helper and may be reused with other inputs. If `size` is 0 or negative, `index += size` will never progress and the loop will not terminate. Consider guarding with `if (size <= 0) throw` or returning `[items]` to make this utility safe for future callers.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| function chunkArray<T>(items: T[], size: number): T[][] { | ||
| const chunks: T[][] = []; | ||
| for (let index = 0; index < items.length; index += size) { |
There was a problem hiding this comment.
issue: Guard against a zero or negative size in chunkArray to avoid a potential infinite loop.
Because historyRevisionBatchSize is hard-coded and positive this works today, but chunkArray is a generic helper and may be reused with other inputs. If size is 0 or negative, index += size will never progress and the loop will not terminate. Consider guarding with if (size <= 0) throw or returning [items] to make this utility safe for future callers.
There was a problem hiding this comment.
4 issues found across 19 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/release-checklist.md">
<violation number="1" location="docs/release-checklist.md:35">
P2: The renamed section removes the CHANGELOG update checklist item, but the "Release decision" section at the bottom of this file still gates releases on "changelog is updated" and "review artifacts are in place." Either add a CHANGELOG bullet back under this section or update the release decision criteria to match.</violation>
</file>
<file name="src/lib/security/audit.ts">
<violation number="1" location="src/lib/security/audit.ts:162">
P2: `scanHistoryLegacy` calls `listCommits` again despite the caller (`scanHistory`) having already fetched the commits. Pass `commits` as a parameter to avoid the redundant `git rev-list --all` invocation on the fallback path.</violation>
<violation number="2" location="src/lib/security/audit.ts:259">
P2: Guard against `size <= 0` in `chunkArray` to prevent an infinite loop. Currently safe because the only caller passes a hard-coded positive constant, but the function signature accepts any number and a zero or negative value will hang the process.</violation>
</file>
<file name=".gitignore">
<violation number="1" location=".gitignore:30">
P2: `CHANGELOG.md` is a standard project-level file name that most release tooling and contributors expect to be tracked. The other entries in this block are clearly internal artifacts, but gitignoring `CHANGELOG.md` will silently prevent any future public changelog from being committed. Consider using a more specific name for the internal artifact (e.g., `AI_CHANGELOG.md`) or removing this entry now that the internal file is already purged from history.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| - `cam doctor` | ||
|
|
||
| ## Review packet checks | ||
| ## Documentation checks |
There was a problem hiding this comment.
P2: The renamed section removes the CHANGELOG update checklist item, but the "Release decision" section at the bottom of this file still gates releases on "changelog is updated" and "review artifacts are in place." Either add a CHANGELOG bullet back under this section or update the release decision criteria to match.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/release-checklist.md, line 35:
<comment>The renamed section removes the CHANGELOG update checklist item, but the "Release decision" section at the bottom of this file still gates releases on "changelog is updated" and "review artifacts are in place." Either add a CHANGELOG bullet back under this section or update the release decision criteria to match.</comment>
<file context>
@@ -32,15 +32,10 @@ Use this checklist before cutting any alpha or beta release of `codex-auto-memor
- `cam doctor`
-## Review packet checks
+## Documentation checks
-- Update `CHANGELOG.md` with the new milestone and commit hash.
</file context>
| return grepFindings; | ||
| } | ||
|
|
||
| return scanHistoryLegacy(cwd); |
There was a problem hiding this comment.
P2: scanHistoryLegacy calls listCommits again despite the caller (scanHistory) having already fetched the commits. Pass commits as a parameter to avoid the redundant git rev-list --all invocation on the fallback path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/security/audit.ts, line 162:
<comment>`scanHistoryLegacy` calls `listCommits` again despite the caller (`scanHistory`) having already fetched the commits. Pass `commits` as a parameter to avoid the redundant `git rev-list --all` invocation on the fallback path.</comment>
<file context>
@@ -148,6 +149,50 @@ async function scanWorkingTree(cwd: string): Promise<AuditFinding[]> {
+ return grepFindings;
+ }
+
+ return scanHistoryLegacy(cwd);
+}
+
</file context>
| ); | ||
| } | ||
|
|
||
| function chunkArray<T>(items: T[], size: number): T[][] { |
There was a problem hiding this comment.
P2: Guard against size <= 0 in chunkArray to prevent an infinite loop. Currently safe because the only caller passes a hard-coded positive constant, but the function signature accepts any number and a zero or negative value will hang the process.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/lib/security/audit.ts, line 259:
<comment>Guard against `size <= 0` in `chunkArray` to prevent an infinite loop. Currently safe because the only caller passes a hard-coded positive constant, but the function signature accepts any number and a zero or negative value will hang the process.</comment>
<file context>
@@ -168,6 +213,57 @@ async function scanHistory(cwd: string): Promise<AuditFinding[]> {
+ );
+}
+
+function chunkArray<T>(items: T[], size: number): T[][] {
+ const chunks: T[][] = [];
+ for (let index = 0; index < items.length; index += size) {
</file context>
| function chunkArray<T>(items: T[], size: number): T[][] { | |
| function chunkArray<T>(items: T[], size: number): T[][] { | |
| if (size <= 0) { | |
| throw new RangeError(`chunkArray size must be positive, got ${size}`); | |
| } |
|
|
||
| # Internal AI / review artifacts should stay local-only | ||
| AGENTS.md | ||
| CHANGELOG.md |
There was a problem hiding this comment.
P2: CHANGELOG.md is a standard project-level file name that most release tooling and contributors expect to be tracked. The other entries in this block are clearly internal artifacts, but gitignoring CHANGELOG.md will silently prevent any future public changelog from being committed. Consider using a more specific name for the internal artifact (e.g., AI_CHANGELOG.md) or removing this entry now that the internal file is already purged from history.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .gitignore, line 30:
<comment>`CHANGELOG.md` is a standard project-level file name that most release tooling and contributors expect to be tracked. The other entries in this block are clearly internal artifacts, but gitignoring `CHANGELOG.md` will silently prevent any future public changelog from being committed. Consider using a more specific name for the internal artifact (e.g., `AI_CHANGELOG.md`) or removing this entry now that the internal file is already purged from history.</comment>
<file context>
@@ -25,6 +25,14 @@ CLAUDE.md
+# Internal AI / review artifacts should stay local-only
+AGENTS.md
+CHANGELOG.md
+docs/progress-log.md
+docs/review-guide.md
</file context>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
test/recovery-records.test.ts (1)
54-88: Optional: Consider adding a test case forundefinedsessionId matching.The
isSyncRecoveryRecordguard allowssessionIdto beundefined, andmatchesSyncRecoveryRecordcompares it via strict equality. A test case verifying that a record withsessionId: undefinedmatches an identity withsessionId: undefined(and doesn't match one with a definedsessionId) would strengthen edge-case coverage.💡 Example test case
it("matches sync recovery records when sessionId is undefined in both", () => { const record = buildSyncRecoveryRecord({ projectId: "project-1", worktreeId: "worktree-1", rolloutPath: "/tmp/rollout.jsonl", sessionId: undefined, configuredExtractorMode: "heuristic", configuredExtractorName: "heuristic", actualExtractorMode: "heuristic", actualExtractorName: "heuristic", status: "no-op", appliedCount: 0, scopesTouched: [], failedStage: "audit-write", failureMessage: "", auditEntryWritten: false }); expect( matchesSyncRecoveryRecord(record, { projectId: "project-1", worktreeId: "worktree-1", rolloutPath: "/tmp/rollout.jsonl", sessionId: undefined }) ).toBe(true); expect( matchesSyncRecoveryRecord(record, { projectId: "project-1", worktreeId: "worktree-1", rolloutPath: "/tmp/rollout.jsonl", sessionId: "session-1" }) ).toBe(false); });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/recovery-records.test.ts` around lines 54 - 88, Add a test that covers the undefined sessionId edge case: create a record via buildSyncRecoveryRecord with sessionId: undefined (and same required identity fields) and assert matchesSyncRecoveryRecord(record, { projectId, worktreeId, rolloutPath, sessionId: undefined }) returns true and that matchesSyncRecoveryRecord returns false when given a defined sessionId (e.g., "session-1"); this validates behavior permitted by isSyncRecoveryRecord and ensures strict equality on sessionId is exercised.src/lib/commands/audit.ts (1)
11-21: Consider handling conflictinghistory/noHistoryflags explicitly.Right now precedence is implicit. A small guard (or parser-level mutual exclusivity) would make CLI behavior clearer when both flags are provided.
Possible implementation
function resolveIncludeHistory(options: AuditCommandOptions): boolean { + if (typeof options.history === "boolean" && options.noHistory === true) { + throw new Error("Cannot use both --history and --no-history."); + } + if (typeof options.history === "boolean") { return options.history; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/commands/audit.ts` around lines 11 - 21, resolveIncludeHistory currently uses implicit precedence between options.history and options.noHistory; update it to explicitly detect the conflict when both flags are set (e.g., options.history !== undefined && options.noHistory === true or both true) and fail fast with a clear error message (or throw a CLI-specific error) instead of silently choosing one; modify the resolveIncludeHistory function (and AuditCommandOptions handling) to check for both flags and throw/report a mutually-exclusive flags error, otherwise proceed with the existing boolean resolution logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/release-checklist.md`:
- Around line 35-39: The "Documentation checks" checklist underspecifies
release-gate prerequisites; add a concrete prep step under the "## Documentation
checks" heading that instructs maintainers to (1) prepare the changelog and
review artifacts (e.g., ensure a drafted CHANGELOG entry and linked PR/review
notes are ready) and (2) perform paired bilingual public-doc verification of
docs/README.md and docs/README.en.md using companion-first wording (confirm
public reading paths and companion-focused phrasing). Update the checklist text
to explicitly require both the changelog/review artifacts be prepared before
release and the paired bilingual review be completed.
---
Nitpick comments:
In `@src/lib/commands/audit.ts`:
- Around line 11-21: resolveIncludeHistory currently uses implicit precedence
between options.history and options.noHistory; update it to explicitly detect
the conflict when both flags are set (e.g., options.history !== undefined &&
options.noHistory === true or both true) and fail fast with a clear error
message (or throw a CLI-specific error) instead of silently choosing one; modify
the resolveIncludeHistory function (and AuditCommandOptions handling) to check
for both flags and throw/report a mutually-exclusive flags error, otherwise
proceed with the existing boolean resolution logic.
In `@test/recovery-records.test.ts`:
- Around line 54-88: Add a test that covers the undefined sessionId edge case:
create a record via buildSyncRecoveryRecord with sessionId: undefined (and same
required identity fields) and assert matchesSyncRecoveryRecord(record, {
projectId, worktreeId, rolloutPath, sessionId: undefined }) returns true and
that matchesSyncRecoveryRecord returns false when given a defined sessionId
(e.g., "session-1"); this validates behavior permitted by isSyncRecoveryRecord
and ensures strict equality on sessionId is exercised.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4bd46496-223e-4ec1-b0e1-3c9c31f0c333
📒 Files selected for processing (19)
.gitignoreREADME.en.mdREADME.mddocs/README.en.mddocs/README.mddocs/release-checklist.mddocs/session-continuity.mdsrc/lib/commands/audit.tssrc/lib/commands/memory.tssrc/lib/commands/session.tssrc/lib/domain/reviewer-history.tssrc/lib/security/audit.tstest/audit.test.tstest/memory-command.test.tstest/memory-sync-audit.test.tstest/recovery-records.test.tstest/reviewer-history.test.tstest/session-command.test.tstest/session-continuity.test.ts
| ## Documentation checks | ||
|
|
||
| - Update `CHANGELOG.md` with the new milestone and commit hash. | ||
| - Update `docs/progress-log.md` to reflect the current phase and remaining gaps. | ||
| - Update `docs/review-guide.md` if a new high-risk area or review order is introduced. | ||
| - Update `docs/reviewer-handoff.md` so external review tools can pick up the current state quickly. | ||
| - Update the bilingual docs entry pages (`docs/README.md` and `docs/README.en.md`) if the public reading path changed. | ||
| - Re-check the current official Codex and Claude public docs before changing migration wording; if the public posture is unchanged, say so explicitly in the handoff. | ||
| - Refresh the local ignored AI handoff file `AI_REVIEW.local.md` with current review/test instructions before handing off to another agent. | ||
| - Ensure the latest milestone commit is focused enough to review independently. |
There was a problem hiding this comment.
Documentation checks now underspecify release-gate prerequisites.
The checklist still gates release on changelog/review artifacts later, but this section no longer tells maintainers to prepare them explicitly. Please add a direct prep step here to avoid release-time ambiguity.
Suggested patch
## Documentation checks
- Update the bilingual docs entry pages (`docs/README.md` and `docs/README.en.md`) if the public reading path changed.
- Re-check the current official Codex and Claude public docs before changing migration wording; if the public posture is unchanged, say so explicitly in the handoff.
+- Confirm where release notes/changelog updates are recorded for this milestone and update them before tagging.
+- Confirm required reviewer artifacts for this milestone are present at their current canonical location.
- Ensure the latest milestone commit is focused enough to review independently.Based on learnings: "Keep release hygiene explicit about paired bilingual public-doc checks and companion-first wording".
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Documentation checks | |
| - Update `CHANGELOG.md` with the new milestone and commit hash. | |
| - Update `docs/progress-log.md` to reflect the current phase and remaining gaps. | |
| - Update `docs/review-guide.md` if a new high-risk area or review order is introduced. | |
| - Update `docs/reviewer-handoff.md` so external review tools can pick up the current state quickly. | |
| - Update the bilingual docs entry pages (`docs/README.md` and `docs/README.en.md`) if the public reading path changed. | |
| - Re-check the current official Codex and Claude public docs before changing migration wording; if the public posture is unchanged, say so explicitly in the handoff. | |
| - Refresh the local ignored AI handoff file `AI_REVIEW.local.md` with current review/test instructions before handing off to another agent. | |
| - Ensure the latest milestone commit is focused enough to review independently. | |
| ## Documentation checks | |
| - Update the bilingual docs entry pages (`docs/README.md` and `docs/README.en.md`) if the public reading path changed. | |
| - Re-check the current official Codex and Claude public docs before changing migration wording; if the public posture is unchanged, say so explicitly in the handoff. | |
| - Confirm where release notes/changelog updates are recorded for this milestone and update them before tagging. | |
| - Confirm required reviewer artifacts for this milestone are present at their current canonical location. | |
| - Ensure the latest milestone commit is focused enough to review independently. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/release-checklist.md` around lines 35 - 39, The "Documentation checks"
checklist underspecifies release-gate prerequisites; add a concrete prep step
under the "## Documentation checks" heading that instructs maintainers to (1)
prepare the changelog and review artifacts (e.g., ensure a drafted CHANGELOG
entry and linked PR/review notes are ready) and (2) perform paired bilingual
public-doc verification of docs/README.md and docs/README.en.md using
companion-first wording (confirm public reading paths and companion-focused
phrasing). Update the checklist text to explicitly require both the
changelog/review artifacts be prepared before release and the paired bilingual
review be completed.
Summary
This PR collects the unpublished work after the repository history cleanup.
It does three things:
cam audit, including real CLI--no-historybehavior and a faster history scan path with legacy fallbackKey changes
cam sessionandcam memoryrecovery-recordsandmemory-sync-auditsessionContinuityAutoLoad/sessionContinuityAutoSavebranchesmtimesession tmp selectioncam audit --no-historysemantics and optimized history scan with batchedgit grepplus fallbackValidation
pnpm lintpnpm testpnpm buildpnpm exec tsx src/cli.ts audit --json --no-historypnpm exec tsx src/cli.ts audit --jsonpnpm exec tsx src/cli.ts doctor --jsonpnpm exec tsx src/cli.ts session status --jsonpnpm exec tsx src/cli.ts memory --json --recent 5Current observed audit result in this branch:
high = 0medium = 0Review notes
mainis already the cleaned baseline; this PR contains only the unpublished code/doc/test changes on top of that baseline.Summary by Sourcery
Refine continuity and memory history presentation while tightening audit history scanning and CLI history flags.
Bug Fixes:
cam auditcorrectly honors--no-historyand--historyflags across both direct command helpers and the real CLI interface.Enhancements:
git greppath with a safe legacy fallback and correct parsing of complex match lines.Documentation:
Summary by cubic
Purges internal review artifacts from the repo (now local-only via
.gitignore) and hardens reviewer flows. Improvescam session/cam memorytext outputs with compact, readable history while keeping JSON contracts unchanged, and fixes/speeds upcam audithistory scanning.Refactors
reviewer-historyhelper to coalesce consecutive entries; used incam sessionandcam memorytext UIs.cam session save|load|status: shows latest rollout, plus a compact prior preview that excludes the latest and groups repeats; JSON still returns raw recent entries.cam memory --recent: text output groups repeated sync events; JSON remains raw; reads extra entries to build a compact view.mtimefor Claude-style local tmp files; docs updated to reflect “latest rollout” and “prior preview”.AGENTS.md,CHANGELOG.md, and related internal guides); cleaned docs index and release checklist.Bug Fixes
cam audit:--no-historyand--historybehave correctly on the CLI and helper; status line reflects the actual mode.git grep -P -zwith case handling; auto-falls back to legacy walk on error; preserves accurate line numbers even with colon patterns.Written for commit 4252aec. Summary will update on new commits.
Summary by CodeRabbit
Release Notes
New Features
Documentation